-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix regex strings in gitpod-cli and ws-daemon #4843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: saisrivathsa The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Created a new PR with requested changes here |
@@ -31,7 +31,7 @@ const ( | |||
) | |||
|
|||
var ( | |||
sizeRegexp = regexp.MustCompile(`(\d+)(k|m|g|t)?`) | |||
sizeRegexp = regexp.MustCompile(`^(\d+)(k|m|g|t)?$`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made changes as requested by @corneliusludmann here
@@ -23,8 +23,8 @@ func TestParseSize(t *testing.T) { | |||
{"42m", 42 * quota.Megabyte, nil}, | |||
{"42g", 42 * quota.Gigabyte, nil}, | |||
{"42t", 42 * quota.Terabyte, nil}, | |||
// This test should fail but doesn't because match somehow matches the regexp | |||
// {"-42m", 0, quota.ErrInvalidSize}, | |||
{"-42m", 0, quota.ErrInvalidSize}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made changes as requested by @corneliusludmann here
/werft run 👍 started the job as gitpod-build-fix-regex-strings-fork.0 |
@aledbf do you know |
@csweichel fix in #4850 |
@saisrivathsa please rebase |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
No description provided.